package io.seata.samples.sb.tccat.consumer.action;

import org.apache.seata.integration.tx.api.remoting.TwoPhaseResult;
import org.apache.seata.rm.tcc.api.*;

/**
 * The interface Tcc action two.
 *
 * @author Administrator
 */
@LocalTCC
public interface TccActionTwo {
    /**
     * 方法功能描述
     *
     * @param param
     * @return io.seata.rm.tcc.TwoPhaseResult
     */
    @TwoPhaseBusinessAction(name = "TccActionTwo", commitMethod = "commit", rollbackMethod = "rollback")
    TwoPhaseResult prepare(@BusinessActionContextParameter(paramName = "param") String param);

    /**
     * 方法功能描述
     *
     * @param actionContext
     * @return io.seata.rm.tcc.TwoPhaseResult
     */
    TwoPhaseResult commit(BusinessActionContext actionContext);

    /**
     * 方法功能描述
     *
     * @param actionContext
     * @return io.seata.rm.tcc.TwoPhaseResult
     */
    TwoPhaseResult rollback(BusinessActionContext actionContext);
}
